
$(function() {
	 new $.cleditor("content", {width:600, height:360});
     cleditor.focus();    
     
     $("#sign").change(function() {
    	cleditor.updateTextArea();
    	 
 		var body = { };
 		body.sign = $(this).val();
 		
 		$.post('customer.php?do=Sign.ajax_email', body, function(data) {
 			var ret = $("#content").val() + "<br/><br/><br/>" + data;
 			
 			$("#content").val(ret);
 			 cleditor.updateFrame();
 		});
     });
     
     _send($('#send').val());
     $('#send').change(function() {
    	 _send($(this).val());
	 });
});

function _send(send) {
	if (send == 2) {
		$("#label_date").show();
	} else {
		$("#label_date").hide();
	}
}